<?php

class Zhlib_Acl extends Zend_Acl {
    
    public function __construct() {
        //Add a new role called "guest"
        $this->addRole(new Zend_Acl_Role('gebruiker'));

        //Add a role called user, which inherits from guest
        $this->addRole(new Zend_Acl_Role('medewerker'), 'gebruiker');
        
        //Add a role called user, which inherits from guest
        $this->addRole(new Zend_Acl_Role('manager'), 'medewerker');
        $this->addRole(new Zend_Acl_Role('administrator'));

        //Add a resource called page
        $this->add(new Zend_Acl_Resource('error'));
        $this->add(new Zend_Acl_Resource('index'));
        $this->add(new Zend_Acl_Resource('klacht'));
        $this->add(new Zend_Acl_Resource('faq'));

        //Finally, we want to allow guests to view pages
        $this->allow('gebruiker', 'index');
        $this->allow('gebruiker', 'error');
        $this->allow('gebruiker', 'klacht');
        
        $this->allow('administrator');
        
    }
    
}
